package org.lc.cmd.impl.completer;

import org.lc.cmd.DataCompleter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class CompleterManager {
    private static final Map<Class<?>, DataCompleter> typedCompleterMap = new ConcurrentHashMap<>();

    @SuppressWarnings("unused")
    public static void registerCompleter(Class<?> type, DataCompleter completer) {
        typedCompleterMap.put(type, completer);
    }

    public static DataCompleter getCompleter(Class<?> type) {
        return typedCompleterMap.get(type);
    }
}
